package com.sfac.springBoot.modules.test.controller;

import com.sfac.springBoot.modules.test.entity.Country;
import com.sfac.springBoot.modules.test.service.CityService;
import com.sfac.springBoot.modules.test.service.CountryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/api")
public class CountryController {

    @Autowired private CountryService countryService;

    @GetMapping("/query11/{countryId}")
    public Country query1(@PathVariable int countryId){
        return countryService.queryById(countryId);
    }
}
